/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.isd.global.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 *
 * @author ctrosch
 */
@Entity
@Table(name = "GRTCPH", schema = "dbo")
public class EstructuraDeConcepto implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected EstructuraDeConceptoPK id;
    @Basic(optional = false)
    @Column(name = "GRTCPH_DESCRP", nullable = false, length = 60)
    private String descrp;
    @Column(name = "GRTCPH_MASCPT", length = 50)
    private String mascpt;
    @Basic(optional = false)
    @Column(name = "GRTCPH_ORDCPT", nullable = false)
    private char ordcpt;
    @Column(name = "GRTCPH_DEBAJA")
    private Character debaja;
    

    public EstructuraDeConcepto() {
    }

    public EstructuraDeConcepto(EstructuraDeConceptoPK id) {
        this.id = id;
    }

    public EstructuraDeConcepto(EstructuraDeConceptoPK id, String grtcphDescrp, char grtcphOrdcpt) {
        this.id = id;
        this.descrp = grtcphDescrp;
        this.ordcpt = grtcphOrdcpt;
    }

    public EstructuraDeConcepto(String grtcphModulo, char grtcphTipcpt) {
        this.id = new EstructuraDeConceptoPK(grtcphModulo, grtcphTipcpt);
    }

    public EstructuraDeConceptoPK getId() {
        return id;
    }

    public void setId(EstructuraDeConceptoPK id) {
        this.id = id;
    }

    public Character getDebaja() {
        return debaja;
    }

    public void setDebaja(Character debaja) {
        this.debaja = debaja;
    }

    public String getDescrp() {
        return descrp;
    }

    public void setDescrp(String descrp) {
        this.descrp = descrp;
    }

    public String getMascpt() {
        return mascpt;
    }

    public void setMascpt(String mascpt) {
        this.mascpt = mascpt;
    }

    public char getOrdcpt() {
        return ordcpt;
    }

    public void setOrdcpt(char ordcpt) {
        this.ordcpt = ordcpt;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EstructuraDeConcepto)) {
            return false;
        }
        EstructuraDeConcepto other = (EstructuraDeConcepto) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "tv.global.modelo.EstructuraDeConceptos[estructuraDeConceptosPK=" + id + "]";
    }

}
